package com.neuedu.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.security.Principal;

@RestController
@RequestMapping("/user")
public class Mytest {
    @GetMapping("/index")
    String index(Principal principal){
        System.out.println("当前用户名为：" + principal.getName());
        return "index";
    }
    @GetMapping("/test")
    String test(){
        return "test";
    }
}
